﻿<%@ Page Language="C#" MasterPageFile="~/aspnet/admin/ForValidation.master" AutoEventWireup="true" CodeFile="CX_ill_Add.aspx.cs" Inherits="aspnet_admin_bock_ill_CX_ill_Add" Title="Untitled Page" %>

<%@ Register assembly="web表单验证控件" namespace="CheckForm" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataKeyNames="CX_ill_id" DataSourceID="SqlDataSource1" DefaultMode="Insert" 
        Height="50px" Width="350px">
        <Fields>
            <asp:boundfield DataField="CX_ill_id" HeaderText="CX_ill_id" 
                InsertVisible="False" ReadOnly="True" SortExpression="CX_ill_id">
            <headerstyle cssclass="100" />
            <itemstyle cssclass="100" />
            </asp:boundfield>
            <asp:templatefield HeaderText="CX_ill_Name" SortExpression="CX_ill_Name">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CX_ill_Name") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CX_ill_Name") %>'></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("CX_ill_Name") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_Age" SortExpression="CX_ill_Age">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("CX_ill_Age") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox1f" runat="server" Text='<%# Bind("CX_ill_Age") %>'></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="TextBox1f" ErrorMessage="只能是数字" 
                        ValidationExpression="\d{0,3}"></asp:RegularExpressionValidator>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("CX_ill_Age") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_marry" SortExpression="CX_ill_marry">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("CX_ill_marry") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                        RepeatDirection="Horizontal" SelectedValue='<%# Bind("CX_ill_marry") %>'>
                        <asp:ListItem Value="1">已婚</asp:ListItem>
                        <asp:ListItem Value="0">末婚</asp:ListItem>
                    </asp:RadioButtonList>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("CX_ill_marry") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_job" SortExpression="CX_ill_job">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("CX_ill_job") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("CX_ill_job") %>' 
                        Height="25px" Width="175px"></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("CX_ill_job") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_Address" SortExpression="CX_ill_Address">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("CX_ill_Address") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("CX_ill_Address") %>' 
                        Width="467px"></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("CX_ill_Address") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_post" SortExpression="CX_ill_post">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("CX_ill_post") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("CX_ill_post") %>'></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label6" runat="server" Text='<%# Bind("CX_ill_post") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_Tel" SortExpression="CX_ill_Tel">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("CX_ill_Tel") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="请入电话号码"></asp:RangeValidator>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label7" runat="server" Text='<%# Bind("CX_ill_Tel") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_date" SortExpression="CX_ill_date">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("CX_ill_date") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# DateTime.Now %>'></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label8" runat="server" Text='<%# Bind("CX_ill_date") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_pwd" SortExpression="CX_ill_pwd">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("CX_ill_pwd") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    请输入密码<asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("CX_ill_pwd") %>'></asp:TextBox>
                    请再次输入<input id="Text1" type="text" />
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label9" runat="server" Text='<%# Bind("CX_ill_pwd") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_ZhenLiao" 
                SortExpression="CX_ill_ZhenLiao">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox10" runat="server" 
                        Text='<%# Bind("CX_ill_ZhenLiao") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox10" runat="server" 
                        Text='<%# Bind("CX_ill_ZhenLiao") %>'  TextMode="MultiLine" 
                         Height="148px" Width="499px"></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label10" runat="server" Text='<%# Bind("CX_ill_ZhenLiao") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_course" SortExpression="CX_ill_course">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox11" runat="server" Text='<%# Bind("CX_ill_course") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox11" runat="server" Text='<%# Bind("CX_ill_course") %>' 
                      TextMode="MultiLine" 
                         Height="148px" Width="499px"></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label11" runat="server" Text='<%# Bind("CX_ill_course") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_Process" SortExpression="CX_ill_Process">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox12" runat="server" Text='<%# Bind("CX_ill_Process") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox12"  TextMode="MultiLine" 
                         Height="148px" Width="499px" runat="server" Text='<%# Bind("CX_ill_Process") %>'></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label12" runat="server" Text='<%# Bind("CX_ill_Process") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_story" SortExpression="CX_ill_story">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox13" runat="server" Text='<%# Bind("CX_ill_story") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox13"  TextMode="MultiLine" 
                         Height="148px" Width="499px" runat="server" Text='<%# Bind("CX_ill_story") %>'></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label13" runat="server" Text='<%# Bind("CX_ill_story") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_check" SortExpression="CX_ill_check">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox14" runat="server" Text='<%# Bind("CX_ill_check") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox14" TextMode="MultiLine" 
                         Height="148px" Width="499px" runat="server" Text='<%# Bind("CX_ill_check") %>'></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label14" runat="server" Text='<%# Bind("CX_ill_check") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:templatefield HeaderText="CX_ill_other" SortExpression="CX_ill_other">
                <edititemtemplate>
                    <asp:TextBox ID="TextBox15" runat="server" Text='<%# Bind("CX_ill_other") %>'></asp:TextBox>
                </edititemtemplate>
                <insertitemtemplate>
                    <asp:TextBox ID="TextBox15" TextMode="MultiLine" 
                         Height="148px" Width="499px" runat="server" Text='<%# Bind("CX_ill_other") %>'></asp:TextBox>
                </insertitemtemplate>
                <itemtemplate>
                    <asp:Label ID="Label15" runat="server" Text='<%# Bind("CX_ill_other") %>'></asp:Label>
                </itemtemplate>
            </asp:templatefield>
            <asp:commandfield ShowInsertButton="True"></asp:commandfield>
        </Fields>
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SqlConn %>" 
        DeleteCommand="DELETE FROM [CX_ill] WHERE [CX_ill_id] = @CX_ill_id" 
        InsertCommand="INSERT INTO [CX_ill] ([CX_ill_Name], [CX_ill_Age], [CX_ill_marry], [CX_ill_job], [CX_ill_Address], [CX_ill_post], [CX_ill_Tel], [CX_ill_date], [CX_ill_pwd], [CX_ill_ZhenLiao], [CX_ill_course], [CX_ill_Process], [CX_ill_story], [CX_ill_check], [CX_ill_other]) VALUES (@CX_ill_Name, @CX_ill_Age, @CX_ill_marry, @CX_ill_job, @CX_ill_Address, @CX_ill_post, @CX_ill_Tel, @CX_ill_date, @CX_ill_pwd, @CX_ill_ZhenLiao, @CX_ill_course, @CX_ill_Process, @CX_ill_story, @CX_ill_check, @CX_ill_other)" 
        SelectCommand="SELECT * FROM [CX_ill]" 
        UpdateCommand="UPDATE [CX_ill] SET [CX_ill_Name] = @CX_ill_Name, [CX_ill_Age] = @CX_ill_Age, [CX_ill_marry] = @CX_ill_marry, [CX_ill_job] = @CX_ill_job, [CX_ill_Address] = @CX_ill_Address, [CX_ill_post] = @CX_ill_post, [CX_ill_Tel] = @CX_ill_Tel, [CX_ill_date] = @CX_ill_date, [CX_ill_pwd] = @CX_ill_pwd, [CX_ill_ZhenLiao] = @CX_ill_ZhenLiao, [CX_ill_course] = @CX_ill_course, [CX_ill_Process] = @CX_ill_Process, [CX_ill_story] = @CX_ill_story, [CX_ill_check] = @CX_ill_check, [CX_ill_other] = @CX_ill_other WHERE [CX_ill_id] = @CX_ill_id">
        <DeleteParameters>
            <asp:parameter Name="CX_ill_id" Type="Decimal" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:parameter Name="CX_ill_Name" Type="String" />
            <asp:parameter Name="CX_ill_Age" Type="Int32" />
            <asp:parameter Name="CX_ill_marry" Type="Byte" />
            <asp:parameter Name="CX_ill_job" Type="String" />
            <asp:parameter Name="CX_ill_Address" Type="String" />
            <asp:parameter Name="CX_ill_post" Type="Int32" />
            <asp:parameter Name="CX_ill_Tel" Type="String" />
            <asp:parameter Name="CX_ill_date" Type="DateTime" />
            <asp:parameter Name="CX_ill_pwd" Type="String" />
            <asp:parameter Name="CX_ill_ZhenLiao" Type="String" />
            <asp:parameter Name="CX_ill_course" Type="String" />
            <asp:parameter Name="CX_ill_Process" Type="String" />
            <asp:parameter Name="CX_ill_story" Type="String" />
            <asp:parameter Name="CX_ill_check" Type="String" />
            <asp:parameter Name="CX_ill_other" Type="String" />
            <asp:parameter Name="CX_ill_id" Type="Decimal" />
        </UpdateParameters>
        <InsertParameters>
            <asp:parameter Name="CX_ill_Name" Type="String" />
            <asp:parameter Name="CX_ill_Age" Type="Int32" />
            <asp:parameter Name="CX_ill_marry" Type="Byte" />
            <asp:parameter Name="CX_ill_job" Type="String" />
            <asp:parameter Name="CX_ill_Address" Type="String" />
            <asp:parameter Name="CX_ill_post" Type="Int32" />
            <asp:parameter Name="CX_ill_Tel" Type="String" />
            <asp:parameter Name="CX_ill_date" Type="DateTime" />
            <asp:parameter Name="CX_ill_pwd" Type="String" />
            <asp:parameter Name="CX_ill_ZhenLiao" Type="String" />
            <asp:parameter Name="CX_ill_course" Type="String" />
            <asp:parameter Name="CX_ill_Process" Type="String" />
            <asp:parameter Name="CX_ill_story" Type="String" />
            <asp:parameter Name="CX_ill_check" Type="String" />
            <asp:parameter Name="CX_ill_other" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
</asp:Content>

